package com.neuedu.service.Imp;

import com.neuedu.dao.Imp.ShopTypeDaoImp;
import com.neuedu.dao.ShopTypeDao;
import com.neuedu.pojo.ShopType;
import com.neuedu.service.ShopTypeService;

import java.util.List;

public class ShopTypeServiceImp implements ShopTypeService {
    private ShopTypeDao shopTypeDao =new ShopTypeDaoImp();
    // 查询店铺类别数据
    @Override
    public List<ShopType> getShopType() {
        try{
            return shopTypeDao.getShopType();
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public Integer addShopType(String categoryName) {
        try{
            return shopTypeDao.addShopType(categoryName);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public Integer updateShopType(String shopCategoryId, String categoryName) {
        try{
            return shopTypeDao.updateShopType(shopCategoryId,categoryName);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public Integer delShopType(String shopCategoryId) {
        try{
            return shopTypeDao.delShopType(shopCategoryId);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
